<template>
	<view class="" style="background:#EEEEEE; height: 100%; " >
		<view class=""style="height: 14px; background: #EEEEEE;" >
			
		</view>
		<view class="text_box" >
			<input type="text" placeholder="请输入目的地" v-model="place">
			<view class="tabadress">
				<view class="icontab" style="width:28pt ;height: 28pt; background: #ffff;border: 0;border-radius: 20px;">
					<img src="./img/image/定位(1)@2x.png" alt="" style="width:28pt ;height: 28pt;" >
				</view>
				<view class="input" >
					请输入目的地
				</view>
			</view>
			<button @click="True()">确认</button>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				place:"",
			}
		},
		methods:{
			True(){
				let pages = getCurrentPages(); // 获取当前页面栈的实例，以数组形式按栈的顺序给出，第一个元素为首页，最后一个元素为当前页面。
				let nowPage = pages[pages.length - 1]; //当前页页面实例
				let prevPage = pages[pages.length - 2]; //上一页页面实例
				// let object = {
				// 	place:this.place
				// };
				// console.log(object)
				prevPage.$vm.place = this.place;
				// prevPage.$vm.[place]=this.place// 給上一頁綁定方法otherFun,傳參object
				uni.navigateBack({
				    delta:1 // 可以不傳delta值，默認為1
				})
				// console.log(prevPage.$vm.place)
				
				
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	.text_box{
		    width: 223pt;
		    height: 254pt;
		    background: #fff;
		    margin: 10px auto;
		    padding: 8%;
			display: flex;
			flex-direction: column;
			border-radius: 10pt  10pt  10pt  10pt  ;
			.tabadress{
				background: #fff;
				display: flex;
				flex-direction: row;
				align-items: center;
				margin-top: 5px;
				color: #8F8FA5;
				font-size: 26px;
				// justify-content: center;
			}
			button{
				width: 300px;
				    background: #3294FF;
				    height: 35px;
				    line-height: 35px;
				    margin-top: 15rem;
					border-radius: 5pt  5pt  5pt  5pt  ;
					font-size: 14pt;
					color: #FFFFFF ;
			}
	}
</style>